using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Windows.Forms;
using C1.Win.C1Input;
using C1.Win.C1List;
using C1.Win.C1TrueDBGrid;
using PCSComProduct.Items.BO;
using PCSComProduct.Items.DS;
using PCSComUtils.Admin.BO;
using PCSComUtils.Common;
using PCSComUtils.PCSExc;
using PCSUtils.Log;
using PCSUtils.Utils;
using AlignHorzEnum = C1.Win.C1TrueDBGrid.AlignHorzEnum;
using BeforeColUpdateEventArgs = C1.Win.C1TrueDBGrid.BeforeColUpdateEventArgs;
using CancelEventArgs = System.ComponentModel.CancelEventArgs;
using ColEventArgs = C1.Win.C1TrueDBGrid.ColEventArgs;
using PresentationEnum = C1.Win.C1TrueDBGrid.PresentationEnum;
using RowColChangeEventArgs = C1.Win.C1TrueDBGrid.RowColChangeEventArgs;
using System.Collections.Generic;
using PCSComUtils.DataContext;

namespace PCSProduct.Items
{
    /// <summary>
    /// Summary description for Routing.
    /// </summary>
    public class Routing : Form
    {
        #region My variables
        private const string THIS = "PCSProduct.Items.Routing";
        DataTable dtbGridLayout = new DataTable();
        private int mProductID;
        public int ProductID
        {
            set { mProductID = value; }
            get { return mProductID; }
        }
        public string strViewRouting;
        private DataSet dstRouting = new DataSet();

        private ITM_Product voProduct = new ITM_Product();
        private EnumAction mFormAction = EnumAction.Default;
        public EnumAction FormAction
        {
            set { mFormAction = value; }
            get { return mFormAction; }
        }
        private bool blnIsChanged = false;
        private bool blnIsLstSaveSuccess = true;
        #endregion My variables

        #region Private variable generate automatic
        private IContainer components;
        private Label label1;
        private Label label2;
        private Label label3;
        private Label lblRevision;
        private Button btnHelp;
        private Button btnFindItem;
        private Button btnClose;
        private Button btnEdit;
        private Button btnSave;
        private Button btnDelete;
        private C1Combo cboCCN;
        private C1TextBox txtItem;
        private Button btnAdd;
        private TextBox txtDescription;
        private TextBox txtRevision;
        private C1TrueDBGrid gridRouting;
        private Label lblProductionLine;
        private Button btnProductionLine;
        private TextBox txtProductionLine;
        #endregion Private variable generate automatic

        #region Windows Form Designer generated code
        public Routing()
        {
            InitializeComponent();
        }
        public Routing(int pintProductID)
        {
            mProductID = pintProductID;
            InitializeComponent();
        }

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose(disposing);
        }

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Routing));
            this.btnFindItem = new System.Windows.Forms.Button();
            this.txtItem = new C1.Win.C1Input.C1TextBox();
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.lblRevision = new System.Windows.Forms.Label();
            this.btnClose = new System.Windows.Forms.Button();
            this.btnHelp = new System.Windows.Forms.Button();
            this.btnEdit = new System.Windows.Forms.Button();
            this.btnSave = new System.Windows.Forms.Button();
            this.btnDelete = new System.Windows.Forms.Button();
            this.btnProductionLine = new System.Windows.Forms.Button();
            this.txtProductionLine = new System.Windows.Forms.TextBox();
            this.lblProductionLine = new System.Windows.Forms.Label();
            this.cboCCN = new C1.Win.C1List.C1Combo();
            this.btnAdd = new System.Windows.Forms.Button();
            this.txtDescription = new System.Windows.Forms.TextBox();
            this.txtRevision = new System.Windows.Forms.TextBox();
            this.gridRouting = new C1.Win.C1TrueDBGrid.C1TrueDBGrid();
            ((System.ComponentModel.ISupportInitialize)(this.txtItem)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.cboCCN)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridRouting)).BeginInit();
            this.SuspendLayout();
            // 
            // btnFindItem
            // 
            this.btnFindItem.AccessibleDescription = resources.GetString("btnFindItem.AccessibleDescription");
            this.btnFindItem.AccessibleName = resources.GetString("btnFindItem.AccessibleName");
            this.btnFindItem.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnFindItem.Anchor")));
            this.btnFindItem.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnFindItem.BackgroundImage")));
            this.btnFindItem.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnFindItem.Dock")));
            this.btnFindItem.Enabled = ((bool)(resources.GetObject("btnFindItem.Enabled")));
            this.btnFindItem.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnFindItem.FlatStyle")));
            this.btnFindItem.Font = ((System.Drawing.Font)(resources.GetObject("btnFindItem.Font")));
            this.btnFindItem.Image = ((System.Drawing.Image)(resources.GetObject("btnFindItem.Image")));
            this.btnFindItem.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnFindItem.ImageAlign")));
            this.btnFindItem.ImageIndex = ((int)(resources.GetObject("btnFindItem.ImageIndex")));
            this.btnFindItem.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnFindItem.ImeMode")));
            this.btnFindItem.Location = ((System.Drawing.Point)(resources.GetObject("btnFindItem.Location")));
            this.btnFindItem.Name = "btnFindItem";
            this.btnFindItem.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnFindItem.RightToLeft")));
            this.btnFindItem.Size = ((System.Drawing.Size)(resources.GetObject("btnFindItem.Size")));
            this.btnFindItem.TabIndex = ((int)(resources.GetObject("btnFindItem.TabIndex")));
            this.btnFindItem.Text = resources.GetString("btnFindItem.Text");
            this.btnFindItem.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnFindItem.TextAlign")));
            this.btnFindItem.Visible = ((bool)(resources.GetObject("btnFindItem.Visible")));
            this.btnFindItem.Click += new System.EventHandler(this.btnFindItem_Click);
            // 
            // txtItem
            // 
            this.txtItem.AcceptsEscape = ((bool)(resources.GetObject("txtItem.AcceptsEscape")));
            this.txtItem.AccessibleDescription = resources.GetString("txtItem.AccessibleDescription");
            this.txtItem.AccessibleName = resources.GetString("txtItem.AccessibleName");
            this.txtItem.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtItem.Anchor")));
            this.txtItem.AutoSize = ((bool)(resources.GetObject("txtItem.AutoSize")));
            this.txtItem.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtItem.BackgroundImage")));
            this.txtItem.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("txtItem.BorderStyle")));
            this.txtItem.CaseSensitive = ((bool)(resources.GetObject("txtItem.CaseSensitive")));
            this.txtItem.Culture = ((int)(resources.GetObject("txtItem.Culture")));
            this.txtItem.CurrentTimeZone = ((bool)(resources.GetObject("txtItem.CurrentTimeZone")));
            this.txtItem.CustomFormat = resources.GetString("txtItem.CustomFormat");
            this.txtItem.DaylightTimeAdjustment = ((C1.Win.C1Input.DaylightTimeAdjustmentEnum)(resources.GetObject("txtItem.DaylightTimeAdjustment")));
            this.txtItem.DisplayFormat.CustomFormat = resources.GetString("txtItem.DisplayFormat.CustomFormat");
            this.txtItem.DisplayFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("txtItem.DisplayFormat.FormatType")));
            this.txtItem.DisplayFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("txtItem.DisplayFormat.Inherit")));
            this.txtItem.DisplayFormat.NullText = resources.GetString("txtItem.DisplayFormat.NullText");
            this.txtItem.DisplayFormat.TrimEnd = ((bool)(resources.GetObject("txtItem.DisplayFormat.TrimEnd")));
            this.txtItem.DisplayFormat.TrimStart = ((bool)(resources.GetObject("txtItem.DisplayFormat.TrimStart")));
            this.txtItem.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtItem.Dock")));
            this.txtItem.EditFormat.CustomFormat = resources.GetString("txtItem.EditFormat.CustomFormat");
            this.txtItem.EditFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("txtItem.EditFormat.FormatType")));
            this.txtItem.EditFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("txtItem.EditFormat.Inherit")));
            this.txtItem.EditFormat.NullText = resources.GetString("txtItem.EditFormat.NullText");
            this.txtItem.EditFormat.TrimEnd = ((bool)(resources.GetObject("txtItem.EditFormat.TrimEnd")));
            this.txtItem.EditFormat.TrimStart = ((bool)(resources.GetObject("txtItem.EditFormat.TrimStart")));
            this.txtItem.EditMask = resources.GetString("txtItem.EditMask");
            this.txtItem.EmptyAsNull = ((bool)(resources.GetObject("txtItem.EmptyAsNull")));
            this.txtItem.Enabled = ((bool)(resources.GetObject("txtItem.Enabled")));
            this.txtItem.ErrorInfo.BeepOnError = ((bool)(resources.GetObject("txtItem.ErrorInfo.BeepOnError")));
            this.txtItem.ErrorInfo.ErrorMessage = resources.GetString("txtItem.ErrorInfo.ErrorMessage");
            this.txtItem.ErrorInfo.ErrorMessageCaption = resources.GetString("txtItem.ErrorInfo.ErrorMessageCaption");
            this.txtItem.ErrorInfo.ShowErrorMessage = ((bool)(resources.GetObject("txtItem.ErrorInfo.ShowErrorMessage")));
            this.txtItem.ErrorInfo.ValueOnError = ((object)(resources.GetObject("txtItem.ErrorInfo.ValueOnError")));
            this.txtItem.Font = ((System.Drawing.Font)(resources.GetObject("txtItem.Font")));
            this.txtItem.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("txtItem.FormatType")));
            this.txtItem.GMTOffset = ((System.TimeSpan)(resources.GetObject("txtItem.GMTOffset")));
            this.txtItem.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtItem.ImeMode")));
            this.txtItem.InitialSelection = ((C1.Win.C1Input.InitialSelectionEnum)(resources.GetObject("txtItem.InitialSelection")));
            this.txtItem.Location = ((System.Drawing.Point)(resources.GetObject("txtItem.Location")));
            this.txtItem.MaskInfo.AutoTabWhenFilled = ((bool)(resources.GetObject("txtItem.MaskInfo.AutoTabWhenFilled")));
            this.txtItem.MaskInfo.CaseSensitive = ((bool)(resources.GetObject("txtItem.MaskInfo.CaseSensitive")));
            this.txtItem.MaskInfo.CopyWithLiterals = ((bool)(resources.GetObject("txtItem.MaskInfo.CopyWithLiterals")));
            this.txtItem.MaskInfo.EditMask = resources.GetString("txtItem.MaskInfo.EditMask");
            this.txtItem.MaskInfo.EmptyAsNull = ((bool)(resources.GetObject("txtItem.MaskInfo.EmptyAsNull")));
            this.txtItem.MaskInfo.ErrorMessage = resources.GetString("txtItem.MaskInfo.ErrorMessage");
            this.txtItem.MaskInfo.Inherit = ((C1.Win.C1Input.MaskInfoInheritFlags)(resources.GetObject("txtItem.MaskInfo.Inherit")));
            this.txtItem.MaskInfo.PromptChar = ((char)(resources.GetObject("txtItem.MaskInfo.PromptChar")));
            this.txtItem.MaskInfo.ShowLiterals = ((C1.Win.C1Input.ShowLiteralsEnum)(resources.GetObject("txtItem.MaskInfo.ShowLiterals")));
            this.txtItem.MaskInfo.StoredEmptyChar = ((char)(resources.GetObject("txtItem.MaskInfo.StoredEmptyChar")));
            this.txtItem.MaxLength = ((int)(resources.GetObject("txtItem.MaxLength")));
            this.txtItem.Multiline = ((bool)(resources.GetObject("txtItem.Multiline")));
            this.txtItem.Name = "txtItem";
            this.txtItem.NullText = resources.GetString("txtItem.NullText");
            this.txtItem.ParseInfo.CaseSensitive = ((bool)(resources.GetObject("txtItem.ParseInfo.CaseSensitive")));
            this.txtItem.ParseInfo.CustomFormat = resources.GetString("txtItem.ParseInfo.CustomFormat");
            this.txtItem.ParseInfo.DateTimeStyle = ((C1.Win.C1Input.DateTimeStyleFlags)(resources.GetObject("txtItem.ParseInfo.DateTimeStyle")));
            this.txtItem.ParseInfo.EmptyAsNull = ((bool)(resources.GetObject("txtItem.ParseInfo.EmptyAsNull")));
            this.txtItem.ParseInfo.ErrorMessage = resources.GetString("txtItem.ParseInfo.ErrorMessage");
            this.txtItem.ParseInfo.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("txtItem.ParseInfo.FormatType")));
            this.txtItem.ParseInfo.Inherit = ((C1.Win.C1Input.ParseInfoInheritFlags)(resources.GetObject("txtItem.ParseInfo.Inherit")));
            this.txtItem.ParseInfo.NullText = resources.GetString("txtItem.ParseInfo.NullText");
            this.txtItem.ParseInfo.NumberStyle = ((C1.Win.C1Input.NumberStyleFlags)(resources.GetObject("txtItem.ParseInfo.NumberStyle")));
            this.txtItem.ParseInfo.TrimEnd = ((bool)(resources.GetObject("txtItem.ParseInfo.TrimEnd")));
            this.txtItem.ParseInfo.TrimStart = ((bool)(resources.GetObject("txtItem.ParseInfo.TrimStart")));
            this.txtItem.PasswordChar = ((char)(resources.GetObject("txtItem.PasswordChar")));
            this.txtItem.PostValidation.CaseSensitive = ((bool)(resources.GetObject("txtItem.PostValidation.CaseSensitive")));
            this.txtItem.PostValidation.ErrorMessage = resources.GetString("txtItem.PostValidation.ErrorMessage");
            this.txtItem.PostValidation.Inherit = ((C1.Win.C1Input.PostValidationInheritFlags)(resources.GetObject("txtItem.PostValidation.Inherit")));
            this.txtItem.PostValidation.Validation = ((C1.Win.C1Input.PostValidationTypeEnum)(resources.GetObject("txtItem.PostValidation.Validation")));
            this.txtItem.PostValidation.Values = ((System.Array)(resources.GetObject("txtItem.PostValidation.Values")));
            this.txtItem.PostValidation.ValuesExcluded = ((System.Array)(resources.GetObject("txtItem.PostValidation.ValuesExcluded")));
            this.txtItem.PreValidation.CaseSensitive = ((bool)(resources.GetObject("txtItem.PreValidation.CaseSensitive")));
            this.txtItem.PreValidation.ErrorMessage = resources.GetString("txtItem.PreValidation.ErrorMessage");
            this.txtItem.PreValidation.Inherit = ((C1.Win.C1Input.PreValidationInheritFlags)(resources.GetObject("txtItem.PreValidation.Inherit")));
            this.txtItem.PreValidation.ItemSeparator = resources.GetString("txtItem.PreValidation.ItemSeparator");
            this.txtItem.PreValidation.PatternString = resources.GetString("txtItem.PreValidation.PatternString");
            this.txtItem.PreValidation.RegexOptions = ((C1.Win.C1Input.RegexOptionFlags)(resources.GetObject("txtItem.PreValidation.RegexOptions")));
            this.txtItem.PreValidation.TrimEnd = ((bool)(resources.GetObject("txtItem.PreValidation.TrimEnd")));
            this.txtItem.PreValidation.TrimStart = ((bool)(resources.GetObject("txtItem.PreValidation.TrimStart")));
            this.txtItem.PreValidation.Validation = ((C1.Win.C1Input.PreValidationTypeEnum)(resources.GetObject("txtItem.PreValidation.Validation")));
            this.txtItem.ReadOnly = true;
            this.txtItem.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtItem.RightToLeft")));
            this.txtItem.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtItem.ScrollBars")));
            this.txtItem.ShowFocusRectangle = ((bool)(resources.GetObject("txtItem.ShowFocusRectangle")));
            this.txtItem.Size = ((System.Drawing.Size)(resources.GetObject("txtItem.Size")));
            this.txtItem.TabIndex = ((int)(resources.GetObject("txtItem.TabIndex")));
            this.txtItem.Tag = ((object)(resources.GetObject("txtItem.Tag")));
            this.txtItem.Text = resources.GetString("txtItem.Text");
            this.txtItem.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtItem.TextAlign")));
            this.txtItem.TextDetached = true;
            this.txtItem.TrimEnd = ((bool)(resources.GetObject("txtItem.TrimEnd")));
            this.txtItem.TrimStart = ((bool)(resources.GetObject("txtItem.TrimStart")));
            this.txtItem.UserCultureOverride = ((bool)(resources.GetObject("txtItem.UserCultureOverride")));
            this.txtItem.Value = ((object)(resources.GetObject("txtItem.Value")));
            this.txtItem.VerticalAlign = ((C1.Win.C1Input.VerticalAlignEnum)(resources.GetObject("txtItem.VerticalAlign")));
            this.txtItem.Visible = ((bool)(resources.GetObject("txtItem.Visible")));
            this.txtItem.WordWrap = ((bool)(resources.GetObject("txtItem.WordWrap")));
            // 
            // label1
            // 
            this.label1.AccessibleDescription = resources.GetString("label1.AccessibleDescription");
            this.label1.AccessibleName = resources.GetString("label1.AccessibleName");
            this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label1.Anchor")));
            this.label1.AutoSize = ((bool)(resources.GetObject("label1.AutoSize")));
            this.label1.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label1.Dock")));
            this.label1.Enabled = ((bool)(resources.GetObject("label1.Enabled")));
            this.label1.Font = ((System.Drawing.Font)(resources.GetObject("label1.Font")));
            this.label1.ForeColor = System.Drawing.Color.Maroon;
            this.label1.Image = ((System.Drawing.Image)(resources.GetObject("label1.Image")));
            this.label1.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label1.ImageAlign")));
            this.label1.ImageIndex = ((int)(resources.GetObject("label1.ImageIndex")));
            this.label1.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label1.ImeMode")));
            this.label1.Location = ((System.Drawing.Point)(resources.GetObject("label1.Location")));
            this.label1.Name = "label1";
            this.label1.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label1.RightToLeft")));
            this.label1.Size = ((System.Drawing.Size)(resources.GetObject("label1.Size")));
            this.label1.TabIndex = ((int)(resources.GetObject("label1.TabIndex")));
            this.label1.Text = resources.GetString("label1.Text");
            this.label1.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label1.TextAlign")));
            this.label1.Visible = ((bool)(resources.GetObject("label1.Visible")));
            // 
            // label2
            // 
            this.label2.AccessibleDescription = resources.GetString("label2.AccessibleDescription");
            this.label2.AccessibleName = resources.GetString("label2.AccessibleName");
            this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label2.Anchor")));
            this.label2.AutoSize = ((bool)(resources.GetObject("label2.AutoSize")));
            this.label2.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label2.Dock")));
            this.label2.Enabled = ((bool)(resources.GetObject("label2.Enabled")));
            this.label2.Font = ((System.Drawing.Font)(resources.GetObject("label2.Font")));
            this.label2.ForeColor = System.Drawing.Color.Maroon;
            this.label2.Image = ((System.Drawing.Image)(resources.GetObject("label2.Image")));
            this.label2.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label2.ImageAlign")));
            this.label2.ImageIndex = ((int)(resources.GetObject("label2.ImageIndex")));
            this.label2.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label2.ImeMode")));
            this.label2.Location = ((System.Drawing.Point)(resources.GetObject("label2.Location")));
            this.label2.Name = "label2";
            this.label2.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label2.RightToLeft")));
            this.label2.Size = ((System.Drawing.Size)(resources.GetObject("label2.Size")));
            this.label2.TabIndex = ((int)(resources.GetObject("label2.TabIndex")));
            this.label2.Text = resources.GetString("label2.Text");
            this.label2.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label2.TextAlign")));
            this.label2.Visible = ((bool)(resources.GetObject("label2.Visible")));
            // 
            // label3
            // 
            this.label3.AccessibleDescription = resources.GetString("label3.AccessibleDescription");
            this.label3.AccessibleName = resources.GetString("label3.AccessibleName");
            this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label3.Anchor")));
            this.label3.AutoSize = ((bool)(resources.GetObject("label3.AutoSize")));
            this.label3.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label3.Dock")));
            this.label3.Enabled = ((bool)(resources.GetObject("label3.Enabled")));
            this.label3.Font = ((System.Drawing.Font)(resources.GetObject("label3.Font")));
            this.label3.ForeColor = System.Drawing.Color.Maroon;
            this.label3.Image = ((System.Drawing.Image)(resources.GetObject("label3.Image")));
            this.label3.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label3.ImageAlign")));
            this.label3.ImageIndex = ((int)(resources.GetObject("label3.ImageIndex")));
            this.label3.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label3.ImeMode")));
            this.label3.Location = ((System.Drawing.Point)(resources.GetObject("label3.Location")));
            this.label3.Name = "label3";
            this.label3.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label3.RightToLeft")));
            this.label3.Size = ((System.Drawing.Size)(resources.GetObject("label3.Size")));
            this.label3.TabIndex = ((int)(resources.GetObject("label3.TabIndex")));
            this.label3.Text = resources.GetString("label3.Text");
            this.label3.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label3.TextAlign")));
            this.label3.Visible = ((bool)(resources.GetObject("label3.Visible")));
            // 
            // lblRevision
            // 
            this.lblRevision.AccessibleDescription = resources.GetString("lblRevision.AccessibleDescription");
            this.lblRevision.AccessibleName = resources.GetString("lblRevision.AccessibleName");
            this.lblRevision.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblRevision.Anchor")));
            this.lblRevision.AutoSize = ((bool)(resources.GetObject("lblRevision.AutoSize")));
            this.lblRevision.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblRevision.Dock")));
            this.lblRevision.Enabled = ((bool)(resources.GetObject("lblRevision.Enabled")));
            this.lblRevision.Font = ((System.Drawing.Font)(resources.GetObject("lblRevision.Font")));
            this.lblRevision.ForeColor = System.Drawing.SystemColors.ControlText;
            this.lblRevision.Image = ((System.Drawing.Image)(resources.GetObject("lblRevision.Image")));
            this.lblRevision.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblRevision.ImageAlign")));
            this.lblRevision.ImageIndex = ((int)(resources.GetObject("lblRevision.ImageIndex")));
            this.lblRevision.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblRevision.ImeMode")));
            this.lblRevision.Location = ((System.Drawing.Point)(resources.GetObject("lblRevision.Location")));
            this.lblRevision.Name = "lblRevision";
            this.lblRevision.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblRevision.RightToLeft")));
            this.lblRevision.Size = ((System.Drawing.Size)(resources.GetObject("lblRevision.Size")));
            this.lblRevision.TabIndex = ((int)(resources.GetObject("lblRevision.TabIndex")));
            this.lblRevision.Text = resources.GetString("lblRevision.Text");
            this.lblRevision.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblRevision.TextAlign")));
            this.lblRevision.Visible = ((bool)(resources.GetObject("lblRevision.Visible")));
            // 
            // btnClose
            // 
            this.btnClose.AccessibleDescription = resources.GetString("btnClose.AccessibleDescription");
            this.btnClose.AccessibleName = resources.GetString("btnClose.AccessibleName");
            this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnClose.Anchor")));
            this.btnClose.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnClose.BackgroundImage")));
            this.btnClose.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.btnClose.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnClose.Dock")));
            this.btnClose.Enabled = ((bool)(resources.GetObject("btnClose.Enabled")));
            this.btnClose.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnClose.FlatStyle")));
            this.btnClose.Font = ((System.Drawing.Font)(resources.GetObject("btnClose.Font")));
            this.btnClose.Image = ((System.Drawing.Image)(resources.GetObject("btnClose.Image")));
            this.btnClose.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.ImageAlign")));
            this.btnClose.ImageIndex = ((int)(resources.GetObject("btnClose.ImageIndex")));
            this.btnClose.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnClose.ImeMode")));
            this.btnClose.Location = ((System.Drawing.Point)(resources.GetObject("btnClose.Location")));
            this.btnClose.Name = "btnClose";
            this.btnClose.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnClose.RightToLeft")));
            this.btnClose.Size = ((System.Drawing.Size)(resources.GetObject("btnClose.Size")));
            this.btnClose.TabIndex = ((int)(resources.GetObject("btnClose.TabIndex")));
            this.btnClose.Text = resources.GetString("btnClose.Text");
            this.btnClose.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.TextAlign")));
            this.btnClose.Visible = ((bool)(resources.GetObject("btnClose.Visible")));
            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
            // 
            // btnHelp
            // 
            this.btnHelp.AccessibleDescription = resources.GetString("btnHelp.AccessibleDescription");
            this.btnHelp.AccessibleName = resources.GetString("btnHelp.AccessibleName");
            this.btnHelp.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnHelp.Anchor")));
            this.btnHelp.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnHelp.BackgroundImage")));
            this.btnHelp.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnHelp.Dock")));
            this.btnHelp.Enabled = ((bool)(resources.GetObject("btnHelp.Enabled")));
            this.btnHelp.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnHelp.FlatStyle")));
            this.btnHelp.Font = ((System.Drawing.Font)(resources.GetObject("btnHelp.Font")));
            this.btnHelp.Image = ((System.Drawing.Image)(resources.GetObject("btnHelp.Image")));
            this.btnHelp.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnHelp.ImageAlign")));
            this.btnHelp.ImageIndex = ((int)(resources.GetObject("btnHelp.ImageIndex")));
            this.btnHelp.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnHelp.ImeMode")));
            this.btnHelp.Location = ((System.Drawing.Point)(resources.GetObject("btnHelp.Location")));
            this.btnHelp.Name = "btnHelp";
            this.btnHelp.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnHelp.RightToLeft")));
            this.btnHelp.Size = ((System.Drawing.Size)(resources.GetObject("btnHelp.Size")));
            this.btnHelp.TabIndex = ((int)(resources.GetObject("btnHelp.TabIndex")));
            this.btnHelp.Text = resources.GetString("btnHelp.Text");
            this.btnHelp.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnHelp.TextAlign")));
            this.btnHelp.Visible = ((bool)(resources.GetObject("btnHelp.Visible")));
            this.btnHelp.Click += new System.EventHandler(this.btnHelp_Click);
            // 
            // btnEdit
            // 
            this.btnEdit.AccessibleDescription = resources.GetString("btnEdit.AccessibleDescription");
            this.btnEdit.AccessibleName = resources.GetString("btnEdit.AccessibleName");
            this.btnEdit.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnEdit.Anchor")));
            this.btnEdit.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnEdit.BackgroundImage")));
            this.btnEdit.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnEdit.Dock")));
            this.btnEdit.Enabled = ((bool)(resources.GetObject("btnEdit.Enabled")));
            this.btnEdit.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnEdit.FlatStyle")));
            this.btnEdit.Font = ((System.Drawing.Font)(resources.GetObject("btnEdit.Font")));
            this.btnEdit.Image = ((System.Drawing.Image)(resources.GetObject("btnEdit.Image")));
            this.btnEdit.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnEdit.ImageAlign")));
            this.btnEdit.ImageIndex = ((int)(resources.GetObject("btnEdit.ImageIndex")));
            this.btnEdit.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnEdit.ImeMode")));
            this.btnEdit.Location = ((System.Drawing.Point)(resources.GetObject("btnEdit.Location")));
            this.btnEdit.Name = "btnEdit";
            this.btnEdit.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnEdit.RightToLeft")));
            this.btnEdit.Size = ((System.Drawing.Size)(resources.GetObject("btnEdit.Size")));
            this.btnEdit.TabIndex = ((int)(resources.GetObject("btnEdit.TabIndex")));
            this.btnEdit.Text = resources.GetString("btnEdit.Text");
            this.btnEdit.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnEdit.TextAlign")));
            this.btnEdit.Visible = ((bool)(resources.GetObject("btnEdit.Visible")));
            this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click);
            // 
            // btnSave
            // 
            this.btnSave.AccessibleDescription = resources.GetString("btnSave.AccessibleDescription");
            this.btnSave.AccessibleName = resources.GetString("btnSave.AccessibleName");
            this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnSave.Anchor")));
            this.btnSave.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSave.BackgroundImage")));
            this.btnSave.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnSave.Dock")));
            this.btnSave.Enabled = ((bool)(resources.GetObject("btnSave.Enabled")));
            this.btnSave.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnSave.FlatStyle")));
            this.btnSave.Font = ((System.Drawing.Font)(resources.GetObject("btnSave.Font")));
            this.btnSave.Image = ((System.Drawing.Image)(resources.GetObject("btnSave.Image")));
            this.btnSave.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSave.ImageAlign")));
            this.btnSave.ImageIndex = ((int)(resources.GetObject("btnSave.ImageIndex")));
            this.btnSave.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnSave.ImeMode")));
            this.btnSave.Location = ((System.Drawing.Point)(resources.GetObject("btnSave.Location")));
            this.btnSave.Name = "btnSave";
            this.btnSave.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnSave.RightToLeft")));
            this.btnSave.Size = ((System.Drawing.Size)(resources.GetObject("btnSave.Size")));
            this.btnSave.TabIndex = ((int)(resources.GetObject("btnSave.TabIndex")));
            this.btnSave.Text = resources.GetString("btnSave.Text");
            this.btnSave.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSave.TextAlign")));
            this.btnSave.Visible = ((bool)(resources.GetObject("btnSave.Visible")));
            this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
            // 
            // btnDelete
            // 
            this.btnDelete.AccessibleDescription = resources.GetString("btnDelete.AccessibleDescription");
            this.btnDelete.AccessibleName = resources.GetString("btnDelete.AccessibleName");
            this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnDelete.Anchor")));
            this.btnDelete.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnDelete.BackgroundImage")));
            this.btnDelete.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnDelete.Dock")));
            this.btnDelete.Enabled = ((bool)(resources.GetObject("btnDelete.Enabled")));
            this.btnDelete.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnDelete.FlatStyle")));
            this.btnDelete.Font = ((System.Drawing.Font)(resources.GetObject("btnDelete.Font")));
            this.btnDelete.Image = ((System.Drawing.Image)(resources.GetObject("btnDelete.Image")));
            this.btnDelete.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDelete.ImageAlign")));
            this.btnDelete.ImageIndex = ((int)(resources.GetObject("btnDelete.ImageIndex")));
            this.btnDelete.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnDelete.ImeMode")));
            this.btnDelete.Location = ((System.Drawing.Point)(resources.GetObject("btnDelete.Location")));
            this.btnDelete.Name = "btnDelete";
            this.btnDelete.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnDelete.RightToLeft")));
            this.btnDelete.Size = ((System.Drawing.Size)(resources.GetObject("btnDelete.Size")));
            this.btnDelete.TabIndex = ((int)(resources.GetObject("btnDelete.TabIndex")));
            this.btnDelete.Text = resources.GetString("btnDelete.Text");
            this.btnDelete.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDelete.TextAlign")));
            this.btnDelete.Visible = ((bool)(resources.GetObject("btnDelete.Visible")));
            this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
            // 
            // btnProductionLine
            // 
            this.btnProductionLine.AccessibleDescription = resources.GetString("btnProductionLine.AccessibleDescription");
            this.btnProductionLine.AccessibleName = resources.GetString("btnProductionLine.AccessibleName");
            this.btnProductionLine.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnProductionLine.Anchor")));
            this.btnProductionLine.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnProductionLine.BackgroundImage")));
            this.btnProductionLine.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnProductionLine.Dock")));
            this.btnProductionLine.Enabled = ((bool)(resources.GetObject("btnProductionLine.Enabled")));
            this.btnProductionLine.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnProductionLine.FlatStyle")));
            this.btnProductionLine.Font = ((System.Drawing.Font)(resources.GetObject("btnProductionLine.Font")));
            this.btnProductionLine.Image = ((System.Drawing.Image)(resources.GetObject("btnProductionLine.Image")));
            this.btnProductionLine.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnProductionLine.ImageAlign")));
            this.btnProductionLine.ImageIndex = ((int)(resources.GetObject("btnProductionLine.ImageIndex")));
            this.btnProductionLine.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnProductionLine.ImeMode")));
            this.btnProductionLine.Location = ((System.Drawing.Point)(resources.GetObject("btnProductionLine.Location")));
            this.btnProductionLine.Name = "btnProductionLine";
            this.btnProductionLine.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnProductionLine.RightToLeft")));
            this.btnProductionLine.Size = ((System.Drawing.Size)(resources.GetObject("btnProductionLine.Size")));
            this.btnProductionLine.TabIndex = ((int)(resources.GetObject("btnProductionLine.TabIndex")));
            this.btnProductionLine.Text = resources.GetString("btnProductionLine.Text");
            this.btnProductionLine.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnProductionLine.TextAlign")));
            this.btnProductionLine.Visible = ((bool)(resources.GetObject("btnProductionLine.Visible")));
            this.btnProductionLine.Click += new System.EventHandler(this.btnProductionLine_Click);
            // 
            // txtProductionLine
            // 
            this.txtProductionLine.AccessibleDescription = resources.GetString("txtProductionLine.AccessibleDescription");
            this.txtProductionLine.AccessibleName = resources.GetString("txtProductionLine.AccessibleName");
            this.txtProductionLine.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtProductionLine.Anchor")));
            this.txtProductionLine.AutoSize = ((bool)(resources.GetObject("txtProductionLine.AutoSize")));
            this.txtProductionLine.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtProductionLine.BackgroundImage")));
            this.txtProductionLine.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtProductionLine.Dock")));
            this.txtProductionLine.Enabled = ((bool)(resources.GetObject("txtProductionLine.Enabled")));
            this.txtProductionLine.Font = ((System.Drawing.Font)(resources.GetObject("txtProductionLine.Font")));
            this.txtProductionLine.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtProductionLine.ImeMode")));
            this.txtProductionLine.Location = ((System.Drawing.Point)(resources.GetObject("txtProductionLine.Location")));
            this.txtProductionLine.MaxLength = ((int)(resources.GetObject("txtProductionLine.MaxLength")));
            this.txtProductionLine.Multiline = ((bool)(resources.GetObject("txtProductionLine.Multiline")));
            this.txtProductionLine.Name = "txtProductionLine";
            this.txtProductionLine.PasswordChar = ((char)(resources.GetObject("txtProductionLine.PasswordChar")));
            this.txtProductionLine.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtProductionLine.RightToLeft")));
            this.txtProductionLine.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtProductionLine.ScrollBars")));
            this.txtProductionLine.Size = ((System.Drawing.Size)(resources.GetObject("txtProductionLine.Size")));
            this.txtProductionLine.TabIndex = ((int)(resources.GetObject("txtProductionLine.TabIndex")));
            this.txtProductionLine.Text = resources.GetString("txtProductionLine.Text");
            this.txtProductionLine.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtProductionLine.TextAlign")));
            this.txtProductionLine.Visible = ((bool)(resources.GetObject("txtProductionLine.Visible")));
            this.txtProductionLine.WordWrap = ((bool)(resources.GetObject("txtProductionLine.WordWrap")));
            this.txtProductionLine.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtProductionLine_KeyDown);
            this.txtProductionLine.Validating += new System.ComponentModel.CancelEventHandler(this.txtProductionLine_Validating);
            // 
            // lblProductionLine
            // 
            this.lblProductionLine.AccessibleDescription = resources.GetString("lblProductionLine.AccessibleDescription");
            this.lblProductionLine.AccessibleName = resources.GetString("lblProductionLine.AccessibleName");
            this.lblProductionLine.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblProductionLine.Anchor")));
            this.lblProductionLine.AutoSize = ((bool)(resources.GetObject("lblProductionLine.AutoSize")));
            this.lblProductionLine.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblProductionLine.Dock")));
            this.lblProductionLine.Enabled = ((bool)(resources.GetObject("lblProductionLine.Enabled")));
            this.lblProductionLine.Font = ((System.Drawing.Font)(resources.GetObject("lblProductionLine.Font")));
            this.lblProductionLine.ForeColor = System.Drawing.Color.Maroon;
            this.lblProductionLine.Image = ((System.Drawing.Image)(resources.GetObject("lblProductionLine.Image")));
            this.lblProductionLine.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblProductionLine.ImageAlign")));
            this.lblProductionLine.ImageIndex = ((int)(resources.GetObject("lblProductionLine.ImageIndex")));
            this.lblProductionLine.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblProductionLine.ImeMode")));
            this.lblProductionLine.Location = ((System.Drawing.Point)(resources.GetObject("lblProductionLine.Location")));
            this.lblProductionLine.Name = "lblProductionLine";
            this.lblProductionLine.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblProductionLine.RightToLeft")));
            this.lblProductionLine.Size = ((System.Drawing.Size)(resources.GetObject("lblProductionLine.Size")));
            this.lblProductionLine.TabIndex = ((int)(resources.GetObject("lblProductionLine.TabIndex")));
            this.lblProductionLine.Text = resources.GetString("lblProductionLine.Text");
            this.lblProductionLine.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblProductionLine.TextAlign")));
            this.lblProductionLine.Visible = ((bool)(resources.GetObject("lblProductionLine.Visible")));
            // 
            // cboCCN
            // 
            this.cboCCN.AccessibleDescription = resources.GetString("cboCCN.AccessibleDescription");
            this.cboCCN.AccessibleName = resources.GetString("cboCCN.AccessibleName");
            this.cboCCN.AddItemSeparator = ';';
            this.cboCCN.AllowRowSizing = C1.Win.C1List.RowSizingEnum.AllRows;
            this.cboCCN.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("cboCCN.Anchor")));
            this.cboCCN.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("cboCCN.BackgroundImage")));
            this.cboCCN.Caption = "";
            this.cboCCN.CaptionHeight = 17;
            this.cboCCN.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal;
            this.cboCCN.ColumnCaptionHeight = 17;
            this.cboCCN.ColumnFooterHeight = 17;
            this.cboCCN.ComboStyle = C1.Win.C1List.ComboStyleEnum.DropdownList;
            this.cboCCN.ContentHeight = 15;
            this.cboCCN.DeadAreaBackColor = System.Drawing.Color.Empty;
            this.cboCCN.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("cboCCN.Dock")));
            this.cboCCN.DropdownPosition = C1.Win.C1List.DropdownPositionEnum.RightDown;
            this.cboCCN.DropDownWidth = 200;
            this.cboCCN.EditorBackColor = System.Drawing.SystemColors.Window;
            this.cboCCN.EditorFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.cboCCN.EditorForeColor = System.Drawing.SystemColors.WindowText;
            this.cboCCN.EditorHeight = 15;
            this.cboCCN.Enabled = ((bool)(resources.GetObject("cboCCN.Enabled")));
            this.cboCCN.Font = ((System.Drawing.Font)(resources.GetObject("cboCCN.Font")));
            this.cboCCN.GapHeight = 2;
            this.cboCCN.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("cboCCN.ImeMode")));
            this.cboCCN.ItemHeight = 13;
            this.cboCCN.Location = ((System.Drawing.Point)(resources.GetObject("cboCCN.Location")));
            this.cboCCN.MatchEntryTimeout = ((long)(2000));
            this.cboCCN.MaxDropDownItems = ((short)(5));
            this.cboCCN.MaxLength = 32767;
            this.cboCCN.MouseCursor = System.Windows.Forms.Cursors.Default;
            this.cboCCN.Name = "cboCCN";
            this.cboCCN.PartialRightColumn = false;
            this.cboCCN.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("cboCCN.RightToLeft")));
            this.cboCCN.RowDivider.Color = System.Drawing.Color.DarkGray;
            this.cboCCN.RowDivider.Style = C1.Win.C1List.LineStyleEnum.None;
            this.cboCCN.RowSubDividerColor = System.Drawing.Color.DarkGray;
            this.cboCCN.Size = ((System.Drawing.Size)(resources.GetObject("cboCCN.Size")));
            this.cboCCN.TabIndex = ((int)(resources.GetObject("cboCCN.TabIndex")));
            this.cboCCN.Text = resources.GetString("cboCCN.Text");
            this.cboCCN.Visible = ((bool)(resources.GetObject("cboCCN.Visible")));
            this.cboCCN.Enter += new System.EventHandler(this.OnEnterControl);
            this.cboCCN.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cboControl_Keydown);
            this.cboCCN.Leave += new System.EventHandler(this.OnLeaveControl);
            this.cboCCN.PropBag = "<?xml version=\"1.0\"?><Blob><Styles type=\"C1.Win.C1List.Design.ContextWrapper\"><Da" +
                "ta>Group{BackColor:ControlDark;Border:None,,0, 0, 0, 0;AlignVert:Center;}Style2{" +
                "}Style5{}Style4{}Style7{}Style6{}EvenRow{BackColor:Aqua;}Selected{ForeColor:High" +
                "lightText;BackColor:Highlight;}Style3{}Inactive{ForeColor:InactiveCaptionText;Ba" +
                "ckColor:InactiveCaption;}Footer{}Caption{AlignHorz:Center;}Normal{BackColor:Wind" +
                "ow;}HighlightRow{ForeColor:HighlightText;BackColor:Highlight;}Style9{AlignHorz:N" +
                "ear;}OddRow{}RecordSelector{AlignImage:Center;}Heading{Wrap:True;AlignVert:Cente" +
                "r;Border:Raised,,1, 1, 1, 1;ForeColor:ControlText;BackColor:Control;}Style8{}Sty" +
                "le10{}Style11{}Style1{}</Data></Styles><Splits><C1.Win.C1List.ListBoxView AllowC" +
                "olSelect=\"False\" Name=\"\" CaptionHeight=\"17\" ColumnCaptionHeight=\"17\" ColumnFoote" +
                "rHeight=\"17\" VerticalScrollGroup=\"1\" HorizontalScrollGroup=\"1\"><ClientRect>0, 0," +
                " 116, 156</ClientRect><VScrollBar><Width>16</Width></VScrollBar><HScrollBar><Hei" +
                "ght>16</Height></HScrollBar><CaptionStyle parent=\"Style2\" me=\"Style9\" /><EvenRow" +
                "Style parent=\"EvenRow\" me=\"Style7\" /><FooterStyle parent=\"Footer\" me=\"Style3\" />" +
                "<GroupStyle parent=\"Group\" me=\"Style11\" /><HeadingStyle parent=\"Heading\" me=\"Sty" +
                "le2\" /><HighLightRowStyle parent=\"HighlightRow\" me=\"Style6\" /><InactiveStyle par" +
                "ent=\"Inactive\" me=\"Style4\" /><OddRowStyle parent=\"OddRow\" me=\"Style8\" /><RecordS" +
                "electorStyle parent=\"RecordSelector\" me=\"Style10\" /><SelectedStyle parent=\"Selec" +
                "ted\" me=\"Style5\" /><Style parent=\"Normal\" me=\"Style1\" /></C1.Win.C1List.ListBoxV" +
                "iew></Splits><NamedStyles><Style parent=\"\" me=\"Normal\" /><Style parent=\"Normal\" " +
                "me=\"Heading\" /><Style parent=\"Heading\" me=\"Footer\" /><Style parent=\"Heading\" me=" +
                "\"Caption\" /><Style parent=\"Heading\" me=\"Inactive\" /><Style parent=\"Normal\" me=\"S" +
                "elected\" /><Style parent=\"Normal\" me=\"HighlightRow\" /><Style parent=\"Normal\" me=" +
                "\"EvenRow\" /><Style parent=\"Normal\" me=\"OddRow\" /><Style parent=\"Heading\" me=\"Rec" +
                "ordSelector\" /><Style parent=\"Caption\" me=\"Group\" /></NamedStyles><vertSplits>1<" +
                "/vertSplits><horzSplits>1</horzSplits><Layout>Modified</Layout><DefaultRecSelWid" +
                "th>17</DefaultRecSelWidth></Blob>";
            // 
            // btnAdd
            // 
            this.btnAdd.AccessibleDescription = resources.GetString("btnAdd.AccessibleDescription");
            this.btnAdd.AccessibleName = resources.GetString("btnAdd.AccessibleName");
            this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnAdd.Anchor")));
            this.btnAdd.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnAdd.BackgroundImage")));
            this.btnAdd.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnAdd.Dock")));
            this.btnAdd.Enabled = ((bool)(resources.GetObject("btnAdd.Enabled")));
            this.btnAdd.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnAdd.FlatStyle")));
            this.btnAdd.Font = ((System.Drawing.Font)(resources.GetObject("btnAdd.Font")));
            this.btnAdd.Image = ((System.Drawing.Image)(resources.GetObject("btnAdd.Image")));
            this.btnAdd.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnAdd.ImageAlign")));
            this.btnAdd.ImageIndex = ((int)(resources.GetObject("btnAdd.ImageIndex")));
            this.btnAdd.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnAdd.ImeMode")));
            this.btnAdd.Location = ((System.Drawing.Point)(resources.GetObject("btnAdd.Location")));
            this.btnAdd.Name = "btnAdd";
            this.btnAdd.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnAdd.RightToLeft")));
            this.btnAdd.Size = ((System.Drawing.Size)(resources.GetObject("btnAdd.Size")));
            this.btnAdd.TabIndex = ((int)(resources.GetObject("btnAdd.TabIndex")));
            this.btnAdd.Text = resources.GetString("btnAdd.Text");
            this.btnAdd.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnAdd.TextAlign")));
            this.btnAdd.Visible = ((bool)(resources.GetObject("btnAdd.Visible")));
            this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
            // 
            // txtDescription
            // 
            this.txtDescription.AccessibleDescription = resources.GetString("txtDescription.AccessibleDescription");
            this.txtDescription.AccessibleName = resources.GetString("txtDescription.AccessibleName");
            this.txtDescription.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtDescription.Anchor")));
            this.txtDescription.AutoSize = ((bool)(resources.GetObject("txtDescription.AutoSize")));
            this.txtDescription.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtDescription.BackgroundImage")));
            this.txtDescription.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtDescription.Dock")));
            this.txtDescription.Enabled = ((bool)(resources.GetObject("txtDescription.Enabled")));
            this.txtDescription.Font = ((System.Drawing.Font)(resources.GetObject("txtDescription.Font")));
            this.txtDescription.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtDescription.ImeMode")));
            this.txtDescription.Location = ((System.Drawing.Point)(resources.GetObject("txtDescription.Location")));
            this.txtDescription.MaxLength = ((int)(resources.GetObject("txtDescription.MaxLength")));
            this.txtDescription.Multiline = ((bool)(resources.GetObject("txtDescription.Multiline")));
            this.txtDescription.Name = "txtDescription";
            this.txtDescription.PasswordChar = ((char)(resources.GetObject("txtDescription.PasswordChar")));
            this.txtDescription.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtDescription.RightToLeft")));
            this.txtDescription.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtDescription.ScrollBars")));
            this.txtDescription.Size = ((System.Drawing.Size)(resources.GetObject("txtDescription.Size")));
            this.txtDescription.TabIndex = ((int)(resources.GetObject("txtDescription.TabIndex")));
            this.txtDescription.Text = resources.GetString("txtDescription.Text");
            this.txtDescription.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtDescription.TextAlign")));
            this.txtDescription.Visible = ((bool)(resources.GetObject("txtDescription.Visible")));
            this.txtDescription.WordWrap = ((bool)(resources.GetObject("txtDescription.WordWrap")));
            this.txtDescription.Leave += new System.EventHandler(this.OnLeaveControl);
            this.txtDescription.Enter += new System.EventHandler(this.OnEnterControl);
            // 
            // txtRevision
            // 
            this.txtRevision.AccessibleDescription = resources.GetString("txtRevision.AccessibleDescription");
            this.txtRevision.AccessibleName = resources.GetString("txtRevision.AccessibleName");
            this.txtRevision.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtRevision.Anchor")));
            this.txtRevision.AutoSize = ((bool)(resources.GetObject("txtRevision.AutoSize")));
            this.txtRevision.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtRevision.BackgroundImage")));
            this.txtRevision.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtRevision.Dock")));
            this.txtRevision.Enabled = ((bool)(resources.GetObject("txtRevision.Enabled")));
            this.txtRevision.Font = ((System.Drawing.Font)(resources.GetObject("txtRevision.Font")));
            this.txtRevision.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtRevision.ImeMode")));
            this.txtRevision.Location = ((System.Drawing.Point)(resources.GetObject("txtRevision.Location")));
            this.txtRevision.MaxLength = ((int)(resources.GetObject("txtRevision.MaxLength")));
            this.txtRevision.Multiline = ((bool)(resources.GetObject("txtRevision.Multiline")));
            this.txtRevision.Name = "txtRevision";
            this.txtRevision.PasswordChar = ((char)(resources.GetObject("txtRevision.PasswordChar")));
            this.txtRevision.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtRevision.RightToLeft")));
            this.txtRevision.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtRevision.ScrollBars")));
            this.txtRevision.Size = ((System.Drawing.Size)(resources.GetObject("txtRevision.Size")));
            this.txtRevision.TabIndex = ((int)(resources.GetObject("txtRevision.TabIndex")));
            this.txtRevision.Text = resources.GetString("txtRevision.Text");
            this.txtRevision.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtRevision.TextAlign")));
            this.txtRevision.Visible = ((bool)(resources.GetObject("txtRevision.Visible")));
            this.txtRevision.WordWrap = ((bool)(resources.GetObject("txtRevision.WordWrap")));
            this.txtRevision.Leave += new System.EventHandler(this.OnLeaveControl);
            this.txtRevision.Enter += new System.EventHandler(this.OnEnterControl);
            // 
            // gridRouting
            // 
            this.gridRouting.AccessibleDescription = resources.GetString("gridRouting.AccessibleDescription");
            this.gridRouting.AccessibleName = resources.GetString("gridRouting.AccessibleName");
            this.gridRouting.AllowAddNew = ((bool)(resources.GetObject("gridRouting.AllowAddNew")));
            this.gridRouting.AllowArrows = ((bool)(resources.GetObject("gridRouting.AllowArrows")));
            this.gridRouting.AllowColMove = ((bool)(resources.GetObject("gridRouting.AllowColMove")));
            this.gridRouting.AllowColSelect = ((bool)(resources.GetObject("gridRouting.AllowColSelect")));
            this.gridRouting.AllowDelete = ((bool)(resources.GetObject("gridRouting.AllowDelete")));
            this.gridRouting.AllowDrag = ((bool)(resources.GetObject("gridRouting.AllowDrag")));
            this.gridRouting.AllowFilter = ((bool)(resources.GetObject("gridRouting.AllowFilter")));
            this.gridRouting.AllowHorizontalSplit = ((bool)(resources.GetObject("gridRouting.AllowHorizontalSplit")));
            this.gridRouting.AllowRowSelect = ((bool)(resources.GetObject("gridRouting.AllowRowSelect")));
            this.gridRouting.AllowSort = ((bool)(resources.GetObject("gridRouting.AllowSort")));
            this.gridRouting.AllowUpdate = ((bool)(resources.GetObject("gridRouting.AllowUpdate")));
            this.gridRouting.AllowUpdateOnBlur = ((bool)(resources.GetObject("gridRouting.AllowUpdateOnBlur")));
            this.gridRouting.AllowVerticalSplit = ((bool)(resources.GetObject("gridRouting.AllowVerticalSplit")));
            this.gridRouting.AlternatingRows = ((bool)(resources.GetObject("gridRouting.AlternatingRows")));
            this.gridRouting.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("gridRouting.Anchor")));
            this.gridRouting.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("gridRouting.BackgroundImage")));
            this.gridRouting.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("gridRouting.BorderStyle")));
            this.gridRouting.Caption = resources.GetString("gridRouting.Caption");
            this.gridRouting.CaptionHeight = ((int)(resources.GetObject("gridRouting.CaptionHeight")));
            this.gridRouting.CellTipsDelay = ((int)(resources.GetObject("gridRouting.CellTipsDelay")));
            this.gridRouting.CellTipsWidth = ((int)(resources.GetObject("gridRouting.CellTipsWidth")));
            this.gridRouting.ChildGrid = ((C1.Win.C1TrueDBGrid.C1TrueDBGrid)(resources.GetObject("gridRouting.ChildGrid")));
            this.gridRouting.CollapseColor = ((System.Drawing.Color)(resources.GetObject("gridRouting.CollapseColor")));
            this.gridRouting.ColumnFooters = ((bool)(resources.GetObject("gridRouting.ColumnFooters")));
            this.gridRouting.ColumnHeaders = ((bool)(resources.GetObject("gridRouting.ColumnHeaders")));
            this.gridRouting.DefColWidth = ((int)(resources.GetObject("gridRouting.DefColWidth")));
            this.gridRouting.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("gridRouting.Dock")));
            this.gridRouting.EditDropDown = ((bool)(resources.GetObject("gridRouting.EditDropDown")));
            this.gridRouting.EmptyRows = ((bool)(resources.GetObject("gridRouting.EmptyRows")));
            this.gridRouting.Enabled = ((bool)(resources.GetObject("gridRouting.Enabled")));
            this.gridRouting.ExpandColor = ((System.Drawing.Color)(resources.GetObject("gridRouting.ExpandColor")));
            this.gridRouting.ExposeCellMode = ((C1.Win.C1TrueDBGrid.ExposeCellModeEnum)(resources.GetObject("gridRouting.ExposeCellMode")));
            this.gridRouting.ExtendRightColumn = ((bool)(resources.GetObject("gridRouting.ExtendRightColumn")));
            this.gridRouting.FetchRowStyles = ((bool)(resources.GetObject("gridRouting.FetchRowStyles")));
            this.gridRouting.FilterBar = ((bool)(resources.GetObject("gridRouting.FilterBar")));
            this.gridRouting.FlatStyle = ((C1.Win.C1TrueDBGrid.FlatModeEnum)(resources.GetObject("gridRouting.FlatStyle")));
            this.gridRouting.Font = ((System.Drawing.Font)(resources.GetObject("gridRouting.Font")));
            this.gridRouting.GroupByAreaVisible = ((bool)(resources.GetObject("gridRouting.GroupByAreaVisible")));
            this.gridRouting.GroupByCaption = resources.GetString("gridRouting.GroupByCaption");
            this.gridRouting.Images.Add(((System.Drawing.Image)(resources.GetObject("resource"))));
            this.gridRouting.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("gridRouting.ImeMode")));
            this.gridRouting.LinesPerRow = ((int)(resources.GetObject("gridRouting.LinesPerRow")));
            this.gridRouting.Location = ((System.Drawing.Point)(resources.GetObject("gridRouting.Location")));
            this.gridRouting.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder;
            this.gridRouting.Name = "gridRouting";
            this.gridRouting.PictureAddnewRow = ((System.Drawing.Image)(resources.GetObject("gridRouting.PictureAddnewRow")));
            this.gridRouting.PictureCurrentRow = ((System.Drawing.Image)(resources.GetObject("gridRouting.PictureCurrentRow")));
            this.gridRouting.PictureFilterBar = ((System.Drawing.Image)(resources.GetObject("gridRouting.PictureFilterBar")));
            this.gridRouting.PictureFooterRow = ((System.Drawing.Image)(resources.GetObject("gridRouting.PictureFooterRow")));
            this.gridRouting.PictureHeaderRow = ((System.Drawing.Image)(resources.GetObject("gridRouting.PictureHeaderRow")));
            this.gridRouting.PictureModifiedRow = ((System.Drawing.Image)(resources.GetObject("gridRouting.PictureModifiedRow")));
            this.gridRouting.PictureStandardRow = ((System.Drawing.Image)(resources.GetObject("gridRouting.PictureStandardRow")));
            this.gridRouting.PreviewInfo.AllowSizing = ((bool)(resources.GetObject("gridRouting.PreviewInfo.AllowSizing")));
            this.gridRouting.PreviewInfo.Caption = resources.GetString("gridRouting.PreviewInfo.Caption");
            this.gridRouting.PreviewInfo.Location = ((System.Drawing.Point)(resources.GetObject("gridRouting.PreviewInfo.Location")));
            this.gridRouting.PreviewInfo.Size = ((System.Drawing.Size)(resources.GetObject("gridRouting.PreviewInfo.Size")));
            this.gridRouting.PreviewInfo.ToolBars = ((bool)(resources.GetObject("gridRouting.PreviewInfo.ToolBars")));
            this.gridRouting.PreviewInfo.UIStrings.Content = ((string[])(resources.GetObject("gridRouting.PreviewInfo.UIStrings.Content")));
            this.gridRouting.PreviewInfo.ZoomFactor = ((System.Double)(resources.GetObject("gridRouting.PreviewInfo.ZoomFactor")));
            this.gridRouting.PrintInfo.MaxRowHeight = ((int)(resources.GetObject("gridRouting.PrintInfo.MaxRowHeight")));
            this.gridRouting.PrintInfo.OwnerDrawPageFooter = ((bool)(resources.GetObject("gridRouting.PrintInfo.OwnerDrawPageFooter")));
            this.gridRouting.PrintInfo.OwnerDrawPageHeader = ((bool)(resources.GetObject("gridRouting.PrintInfo.OwnerDrawPageHeader")));
            this.gridRouting.PrintInfo.PageFooter = resources.GetString("gridRouting.PrintInfo.PageFooter");
            this.gridRouting.PrintInfo.PageFooterHeight = ((int)(resources.GetObject("gridRouting.PrintInfo.PageFooterHeight")));
            this.gridRouting.PrintInfo.PageHeader = resources.GetString("gridRouting.PrintInfo.PageHeader");
            this.gridRouting.PrintInfo.PageHeaderHeight = ((int)(resources.GetObject("gridRouting.PrintInfo.PageHeaderHeight")));
            this.gridRouting.PrintInfo.PrintHorizontalSplits = ((bool)(resources.GetObject("gridRouting.PrintInfo.PrintHorizontalSplits")));
            this.gridRouting.PrintInfo.ProgressCaption = resources.GetString("gridRouting.PrintInfo.ProgressCaption");
            this.gridRouting.PrintInfo.RepeatColumnFooters = ((bool)(resources.GetObject("gridRouting.PrintInfo.RepeatColumnFooters")));
            this.gridRouting.PrintInfo.RepeatColumnHeaders = ((bool)(resources.GetObject("gridRouting.PrintInfo.RepeatColumnHeaders")));
            this.gridRouting.PrintInfo.RepeatGridHeader = ((bool)(resources.GetObject("gridRouting.PrintInfo.RepeatGridHeader")));
            this.gridRouting.PrintInfo.RepeatSplitHeaders = ((bool)(resources.GetObject("gridRouting.PrintInfo.RepeatSplitHeaders")));
            this.gridRouting.PrintInfo.ShowOptionsDialog = ((bool)(resources.GetObject("gridRouting.PrintInfo.ShowOptionsDialog")));
            this.gridRouting.PrintInfo.ShowProgressForm = ((bool)(resources.GetObject("gridRouting.PrintInfo.ShowProgressForm")));
            this.gridRouting.PrintInfo.ShowSelection = ((bool)(resources.GetObject("gridRouting.PrintInfo.ShowSelection")));
            this.gridRouting.PrintInfo.UseGridColors = ((bool)(resources.GetObject("gridRouting.PrintInfo.UseGridColors")));
            this.gridRouting.RecordSelectors = ((bool)(resources.GetObject("gridRouting.RecordSelectors")));
            this.gridRouting.RecordSelectorWidth = ((int)(resources.GetObject("gridRouting.RecordSelectorWidth")));
            this.gridRouting.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("gridRouting.RightToLeft")));
            this.gridRouting.RowDivider.Color = ((System.Drawing.Color)(resources.GetObject("resource.Color")));
            this.gridRouting.RowDivider.Style = ((C1.Win.C1TrueDBGrid.LineStyleEnum)(resources.GetObject("resource.Style")));
            this.gridRouting.RowHeight = ((int)(resources.GetObject("gridRouting.RowHeight")));
            this.gridRouting.RowSubDividerColor = ((System.Drawing.Color)(resources.GetObject("gridRouting.RowSubDividerColor")));
            this.gridRouting.ScrollTips = ((bool)(resources.GetObject("gridRouting.ScrollTips")));
            this.gridRouting.ScrollTrack = ((bool)(resources.GetObject("gridRouting.ScrollTrack")));
            this.gridRouting.Size = ((System.Drawing.Size)(resources.GetObject("gridRouting.Size")));
            this.gridRouting.SpringMode = ((bool)(resources.GetObject("gridRouting.SpringMode")));
            this.gridRouting.TabAcrossSplits = ((bool)(resources.GetObject("gridRouting.TabAcrossSplits")));
            this.gridRouting.TabIndex = ((int)(resources.GetObject("gridRouting.TabIndex")));
            this.gridRouting.Text = resources.GetString("gridRouting.Text");
            this.gridRouting.ViewCaptionWidth = ((int)(resources.GetObject("gridRouting.ViewCaptionWidth")));
            this.gridRouting.ViewColumnWidth = ((int)(resources.GetObject("gridRouting.ViewColumnWidth")));
            this.gridRouting.Visible = ((bool)(resources.GetObject("gridRouting.Visible")));
            this.gridRouting.WrapCellPointer = ((bool)(resources.GetObject("gridRouting.WrapCellPointer")));
            this.gridRouting.AfterDelete += new System.EventHandler(this.gridRouting_AfterDelete);
            this.gridRouting.RowColChange += new C1.Win.C1TrueDBGrid.RowColChangeEventHandler(this.gridRouting_RowColChange);
            this.gridRouting.ButtonClick += new C1.Win.C1TrueDBGrid.ColEventHandler(this.gridRouting_ButtonClick);
            this.gridRouting.AfterColUpdate += new C1.Win.C1TrueDBGrid.ColEventHandler(this.gridRouting_AfterColUpdate);
            this.gridRouting.BeforeColUpdate += new C1.Win.C1TrueDBGrid.BeforeColUpdateEventHandler(this.gridRouting_BeforeColUpdate);
            this.gridRouting.BeforeRowColChange += new C1.Win.C1TrueDBGrid.CancelEventHandler(this.gridRouting_BeforeRowColChange);
            this.gridRouting.KeyDown += new System.Windows.Forms.KeyEventHandler(this.gridRouting_KeyDown);
            this.gridRouting.OnAddNew += new System.EventHandler(this.gridRouting_OnAddNew);
            this.gridRouting.PropBag = resources.GetString("gridRouting.PropBag");
            // 
            // Routing
            // 
            this.AccessibleDescription = resources.GetString("$this.AccessibleDescription");
            this.AccessibleName = resources.GetString("$this.AccessibleName");
            this.AutoScaleBaseSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScaleBaseSize")));
            this.AutoScroll = ((bool)(resources.GetObject("$this.AutoScroll")));
            this.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMargin")));
            this.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMinSize")));
            this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
            this.CancelButton = this.btnClose;
            this.ClientSize = ((System.Drawing.Size)(resources.GetObject("$this.ClientSize")));
            this.Controls.Add(this.txtProductionLine);
            this.Controls.Add(this.txtRevision);
            this.Controls.Add(this.txtDescription);
            this.Controls.Add(this.gridRouting);
            this.Controls.Add(this.btnAdd);
            this.Controls.Add(this.cboCCN);
            this.Controls.Add(this.btnSave);
            this.Controls.Add(this.btnDelete);
            this.Controls.Add(this.btnClose);
            this.Controls.Add(this.btnHelp);
            this.Controls.Add(this.btnEdit);
            this.Controls.Add(this.btnFindItem);
            this.Controls.Add(this.txtItem);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.lblRevision);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.lblProductionLine);
            this.Controls.Add(this.btnProductionLine);
            this.Enabled = ((bool)(resources.GetObject("$this.Enabled")));
            this.Font = ((System.Drawing.Font)(resources.GetObject("$this.Font")));
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("$this.ImeMode")));
            this.KeyPreview = true;
            this.Location = ((System.Drawing.Point)(resources.GetObject("$this.Location")));
            this.MaximumSize = ((System.Drawing.Size)(resources.GetObject("$this.MaximumSize")));
            this.MinimumSize = ((System.Drawing.Size)(resources.GetObject("$this.MinimumSize")));
            this.Name = "Routing";
            this.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("$this.RightToLeft")));
            this.StartPosition = ((System.Windows.Forms.FormStartPosition)(resources.GetObject("$this.StartPosition")));
            this.Text = resources.GetString("$this.Text");
            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Routing_KeyDown);
            this.Closing += new System.ComponentModel.CancelEventHandler(this.Routing_Closing);
            this.Load += new System.EventHandler(this.Routing_Load);
            ((System.ComponentModel.ISupportInitialize)(this.txtItem)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.cboCCN)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridRouting)).EndInit();
            this.ResumeLayout(false);

        }
        #endregion

        #region DataRow -> VO -> Controls
        //**************************************************************************              
        ///    <Description>
        ///       This method uses to fill data from voproduc to controls
        ///    </Description>
        ///    <Inputs>
        ///            
        ///    </Inputs>
        ///    <Outputs>
        ///       
        ///    </Outputs>
        ///    <Returns>
        ///       
        ///    </Returns>
        ///    <Authors>
        ///       Hoang Trung Son - iSphere software
        ///    </Authors>
        ///    <History>
        ///       Friday, January 28, 2005
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************
        private void VOProductToControls()
        {
            //mProductID = 2;			// remove later
            ProductItemInfoBO ProductItemBO = new ProductItemInfoBO();
            RoutingBO boRouting = new RoutingBO();
            voProduct = ProductItemBO.GetProductInfo(mProductID);
            if (voProduct == null) return;
            // Load Product item
            if (voProduct.CCNID > 0)
                cboCCN.SelectedValue = voProduct.CCNID;
            txtItem.Text = voProduct.Code;
            txtRevision.Text = voProduct.Revision;
            txtDescription.Text = voProduct.Description;


            // added: dungla 15-02-2005
            // production line information
            if (voProduct.ProductionLineID!=null)
            {
                int iProductLineID = voProduct.ProductionLineID ?? 0;
                txtProductionLine.Text = boRouting.GetProductionLineCode(iProductLineID);
                txtProductionLine.Tag = voProduct.ProductionLineID;
            }
            // product group information

        }

        #endregion DataRow -> VO -> Controls

        #region Load, list Save,Add,Edit,Delete,Cancel buttons
        //**************************************************************************              
        ///    <Description>
        ///       This method uses to load form
        ///    </Description>
        ///    <Inputs>
        ///            
        ///    </Inputs>
        ///    <Outputs>
        ///       
        ///    </Outputs>
        ///    <Returns>
        ///       
        ///    </Returns>
        ///    <Authors>
        ///       Hoang Trung Son - iSphere software
        ///    </Authors>
        ///    <History>
        ///       Thursday, January 27, 2005
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************
        private void Routing_Load(object sender, EventArgs e)
        {
            const string METHOD_NAME = THIS + ".Routing_Load()";
            try
            {
                #region Security
                //Set authorization for user
                Security objSecurity = new Security();
                this.Name = THIS;
                if (objSecurity.SetRightForUserOnForm(this, SystemProperty.UserName) == 0)
                {
                    // You don't have the right to view this item
                    PCSMessageBox.Show(ErrorCode.MESSAGE_YOU_HAVE_NO_RIGHT_TO_VIEW, MessageBoxIcon.Warning);
                    this.Close();
                    return;
                }
                #endregion

                // store caption 
                dtbGridLayout = FormControlComponents.StoreGridLayout(gridRouting);

                // Load cboCCN
                ManageUserBO boManageUser = new ManageUserBO();
                DataSet dstCCN = boManageUser.ListCCN();
                FormControlComponents.PutDataIntoC1ComboBox(cboCCN, dstCCN.Tables[MST_CCNTable.TABLE_NAME], MST_CCNTable.CODE_FLD, MST_CCNTable.CCNID_FLD, MST_CCNTable.TABLE_NAME);

                VOProductToControls();

                // Load data for grid
                InitRouting();
                ResstoreGridButton();

                txtProductionLine.Enabled = true;
                btnProductionLine.Enabled = true;

                txtItem.Enabled = false;
            }
            catch (PCSException ex)
            {
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        void ResstoreGridButton()
        {
            //gridRouting.Splits[0].DisplayColumns["Step"].Locked = true;
            gridRouting.Splits[0].DisplayColumns["WorkCenterCode"].Button = true;
            gridRouting.Splits[0].DisplayColumns["WorkCenterName"].Locked = true;
            gridRouting.Splits[0].DisplayColumns["LaborRunTime"].DataColumn.NumberFormat = Constants.DECIMAL_NUMBERFORMAT;
            gridRouting.Splits[0].DisplayColumns["CalculateTime"].DataColumn.ValueItems.Presentation = PresentationEnum.CheckBox;
            gridRouting.Splits[0].DisplayColumns["CalculateTime"].Style.HorizontalAlignment = AlignHorzEnum.Center;
        }

        #endregion List Save,Add,Edit,Delete,Cancel buttons

        #region Add,Save,Edit,Delete buttons
        //**************************************************************************              
        ///    <Description>
        ///       This method uses to add new form
        ///    </Description>
        ///    <Inputs>
        ///            
        ///    </Inputs>
        ///    <Outputs>
        ///       
        ///    </Outputs>
        ///    <Returns>
        ///       
        ///    </Returns>
        ///    <Authors>
        ///       Hoang Trung Son - iSphere software
        ///    </Authors>
        ///    <History>
        ///       Thursday, January 27, 2005
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************
        private void btnAdd_Click(object sender, EventArgs e)
        {
            // Code Inserted Automatically

            #region Code Inserted Automatically

            this.Cursor = Cursors.WaitCursor;

            #endregion Code Inserted Automatically


            const string METHOD_NAME = THIS + ".METHOD_NAME()";
            try
            {
                // clear control
                blnIsChanged = true;
                txtItem.Text = string.Empty;
                if (SystemProperty.CCNID > 0)
                    cboCCN.SelectedValue = SystemProperty.CCNID;
                else cboCCN.Text = string.Empty;
                txtRevision.Text = string.Empty;
                txtDescription.Text = string.Empty;

                txtProductionLine.Enabled = true;
                btnProductionLine.Enabled = true;

                txtProductionLine.Text = string.Empty;
                txtProductionLine.Tag = null;

                // set enable button
                btnFindItem.Enabled = true;
                mFormAction = EnumAction.Add;
                SetEnableButtons();
                btnFindItem.Focus();

                // Load data for grid
                mProductID = 0;
                InitRouting();
                ResstoreGridButton();
                gridRouting.AllowAddNew = gridRouting.AllowUpdate = true;
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }

            // Code Inserted Automatically

            #region Code Inserted Automatically

            this.Cursor = Cursors.Default;

            #endregion Code Inserted Automatically


        }

        //**************************************************************************              
        ///    <Description>
        ///       This method uses to save data into database
        ///    </Description>
        ///    <Inputs>
        ///            
        ///    </Inputs>
        ///    <Outputs>
        ///       
        ///    </Outputs>
        ///    <Returns>
        ///       
        ///    </Returns>
        ///    <Authors>
        ///       Hoang Trung Son - iSphere software
        ///    </Authors>
        ///    <History>
        ///       Thursday, January 27, 2005
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************
        private void btnSave_Click(object sender, EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnSave_Click()";
            try
            {
                if (CheckMandatory(txtItem))
                {
                    PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Exclamation);
                    btnFindItem.Focus();
                    return;
                }
                if (CheckMandatory(cboCCN))
                {
                    PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Exclamation);
                    cboCCN.Focus();
                    return;
                }

                if (txtProductionLine.Tag == null)
                {
                    PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Exclamation);
                    txtProductionLine.Focus();
                    return;
                }

                RoutingBO boRouting = new RoutingBO();
                // gets list of work center
                string strWorkCenterIDs = string.Empty;
                foreach (DataRow drowWC in dstRouting.Tables[0].Rows)
                {
                    if (drowWC.RowState != DataRowState.Deleted)
                        strWorkCenterIDs += drowWC[MST_WorkCenterTable.WORKCENTERID_FLD].ToString() + ",";
                }
                // remove the last comma
                if (strWorkCenterIDs.IndexOf(",") >= 0)
                    strWorkCenterIDs = strWorkCenterIDs.Substring(0, strWorkCenterIDs.Length - 1);
                if (blnIsLstSaveSuccess)
                {
                    List<ITM_Routing> listRouting = new List<ITM_Routing>();
                    foreach (DataRow dr in dstRouting.Tables[0].Rows)
                    {
                        try
                        {
                            ITM_Routing obj = new ITM_Routing();
                            obj.CalculateTime = bool.Parse(dr[ITM_RoutingTable.CALCULATETIME_FLD].ToString());

                            if (dr[ITM_RoutingTable.STEP_FLD] != null && dr[ITM_RoutingTable.STEP_FLD].ToString() != string.Empty)
                                obj.Step = Convert.ToInt32(dr[ITM_RoutingTable.STEP_FLD].ToString());
                            if (dr[ITM_RoutingTable.WORKCENTERID_FLD] != null && dr[ITM_RoutingTable.WORKCENTERID_FLD].ToString() != string.Empty)
                                obj.WorkCenterID = Convert.ToInt32(dr[ITM_RoutingTable.WORKCENTERID_FLD].ToString());
                            if (dr[ITM_RoutingTable.LABORRUNTIME_FLD] != null && dr[ITM_RoutingTable.LABORRUNTIME_FLD].ToString() != string.Empty)
                                obj.LaborRunTime = Convert.ToDecimal(dr[ITM_RoutingTable.LABORRUNTIME_FLD].ToString());
                            if (dr[ITM_RoutingTable.PRODUCTID_FLD] != null && dr[ITM_RoutingTable.PRODUCTID_FLD].ToString() != string.Empty)
                                obj.ProductID = Convert.ToInt32(dr[ITM_RoutingTable.PRODUCTID_FLD].ToString());
                            listRouting.Add(obj);
                        }
                        catch
                        { }
                    }
                    //boRouting.UpdateDataSet(dstRouting);
                    voProduct.ProductionLineID = Convert.ToInt32(txtProductionLine.Tag);
                    boRouting.UpdateRouting(listRouting, voProduct);
                    
                    blnIsChanged = false;
                    btnFindItem.Enabled = false;
                    mFormAction = EnumAction.Default;
                    SetEnableButtons();

                    txtProductionLine.Enabled = false;
                    btnProductionLine.Enabled = false;

                    PCSMessageBox.Show(ErrorCode.MESSAGE_AFTER_SAVE_DATA);
                    // Reload data for grid
                    InitRouting();
                    ResstoreGridButton();
                    gridRouting.AllowAddNew = gridRouting.AllowUpdate = false;
                }
            }
            catch (PCSException ex)
            {
                // if any error, rejects all changes in grid
                dstRouting.RejectChanges();
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }

            // Code Inserted Automatically




        }

        //**************************************************************************              
        ///    <Description>
        ///       This method uses to set form editable
        ///    </Description>
        ///    <Inputs>
        ///            
        ///    </Inputs>
        ///    <Outputs>
        ///       
        ///    </Outputs>
        ///    <Returns>
        ///       
        ///    </Returns>
        ///    <Authors>
        ///       Hoang Trung Son - iSphere software
        ///    </Authors>
        ///    <History>
        ///       Thursday, January 27, 2005
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************
        private void btnEdit_Click(object sender, EventArgs e)
        {
            // Code Inserted Automatically

            #region Code Inserted Automatically

            this.Cursor = Cursors.WaitCursor;

            #endregion Code Inserted Automatically


            blnIsChanged = true;

            txtProductionLine.Enabled = true;
            btnProductionLine.Enabled = true;

            // set enable button
            btnFindItem.Enabled = false;
            mFormAction = EnumAction.Edit;
            SetEnableButtons();
            gridRouting.AllowAddNew = gridRouting.AllowUpdate = true;

            #region Code Inserted Automatically

            this.Cursor = Cursors.Default;

            #endregion Code Inserted Automatically


        }
        //**************************************************************************              
        ///    <Description>
        ///       This method uses to delete data form
        ///    </Description>
        ///    <Inputs>
        ///            
        ///    </Inputs>
        ///    <Outputs>
        ///       
        ///    </Outputs>
        ///    <Returns>
        ///       
        ///    </Returns>
        ///    <Authors>
        ///       Hoang Trung Son - iSphere software
        ///    </Authors>
        ///    <History>
        ///       Thursday, January 27, 2005
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************
        private void btnDelete_Click(object sender, EventArgs e)
        {
            // Code Inserted Automatically

            #region Code Inserted Automatically

            this.Cursor = Cursors.WaitCursor;

            #endregion Code Inserted Automatically


            const string METHOD_NAME = THIS + ".btnDelete_Click()";
            try
            {
                // if exist product then excute deleted, else do nothing
                if (voProduct.ProductID > 0)
                {
                    DialogResult enumResult = PCSMessageBox.Show(ErrorCode.MESSAGE_DELETE_RECORD, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    if (enumResult == DialogResult.Yes)
                    {

                        RoutingBO boRouting = new RoutingBO();

                        // Delete all row in the routing grid
                        //if(dstRouting.Tables.Count > 0)
                        List<ITM_Routing> listRouting = new List<ITM_Routing>();
                        foreach (DataRow objRow in dstRouting.Tables[0].Rows)
                            if (objRow.RowState != DataRowState.Deleted) objRow.Delete();
                        gridRouting.Update();
                        // 08-04-2006 dungla
                        //Delete Routing information in Product table
                        voProduct.RoutingDescription = string.Empty;
                        voProduct.RoutingIncrement = 0;
                        voProduct.ProductionLineID = 0;
                        voProduct.ProductGroupID = 0;
                        voProduct.CostCenterRateMasterID = 0;
                        //boRouting.UpdateRouting(new List<ITM_Routing>(), voProduct);
                        boRouting.Delete(voProduct);
                        
                        // Set enable button and clear info on form
                        blnIsChanged = false;
                        //btnAdd.Enabled = true;
                        //btnDelete.Enabled = btnSave.Enabled = btnEdit.Enabled = false;
                        mFormAction = EnumAction.Delete;
                        SetEnableButtons();

                        // Clear routing product information on form
                        voProduct = new ITM_Product();

                        btnAdd.Enabled = true;
                        btnSave.Enabled = false;
                    }
                }
            }
            catch (PCSException ex)
            {
                // reject changes if error
                dstRouting.RejectChanges();
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }

            // Code Inserted Automatically

            #region Code Inserted Automatically

            this.Cursor = Cursors.Default;

            #endregion Code Inserted Automatically


        }

        #endregion Add,Save,Edit,Delete buttons

        #region Other events

        private void btnHelp_Click(object sender, EventArgs e)
        {
            // Code Inserted Automatically

            #region Code Inserted Automatically

            this.Cursor = Cursors.WaitCursor;

            #endregion Code Inserted Automatically




            // Code Inserted Automatically

            #region Code Inserted Automatically

            this.Cursor = Cursors.Default;

            #endregion Code Inserted Automatically


        }

        //**************************************************************************              
        ///    <Description>
        ///       This method uses to close form
        ///    </Description>
        ///    <Inputs>
        ///            
        ///    </Inputs>
        ///    <Outputs>
        ///       
        ///    </Outputs>
        ///    <Returns>
        ///       
        ///    </Returns>
        ///    <Authors>
        ///       Hoang Trung Son - iSphere software
        ///    </Authors>
        ///    <History>
        ///       Thursday, January 27, 2005
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************
        private void btnClose_Click(object sender, EventArgs e)
        {
            // Code Inserted Automatically

            #region Code Inserted Automatically

            this.Cursor = Cursors.WaitCursor;

            #endregion Code Inserted Automatically


            this.Close();

            // Code Inserted Automatically

            #region Code Inserted Automatically

            this.Cursor = Cursors.Default;

            #endregion Code Inserted Automatically


        }

        //**************************************************************************              
        ///    <Description>
        ///       This method uses to find item
        ///    </Description>
        ///    <Inputs>
        ///            
        ///    </Inputs>
        ///    <Outputs>
        ///       
        ///    </Outputs>
        ///    <Returns>
        ///       
        ///    </Returns>
        ///    <Authors>
        ///       Hoang Trung Son - iSphere software
        ///    </Authors>
        ///    <History>
        ///       Thursday, January 27, 2005
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************
        private void btnFindItem_Click(object sender, EventArgs e)
        {
            // Code Inserted Automatically

            #region Code Inserted Automatically

            this.Cursor = Cursors.WaitCursor;

            #endregion Code Inserted Automatically


            const string METHOD_NAME = THIS + ".btnFindItem_Click()";
            const string MAKE_ITEM = "1";
            try
            {
                voProduct = new ITM_Product();

                Hashtable htbCondition = new Hashtable();
                htbCondition.Add(ITM_ProductTable.MAKEITEM_FLD, MAKE_ITEM);
                DataRowView drowView = FormControlComponents.OpenSearchForm(ITM_ProductTable.TABLE_NAME, ITM_ProductTable.CODE_FLD, txtItem.Text.Trim(), htbCondition, true);
                //if (frmViewTableForm.ShowDialog() == DialogResult.OK)
                if (drowView != null)
                {
                    //mProductID = int.Parse(frmViewTableForm.ReturnField);
                    mProductID = int.Parse(drowView[ITM_ProductTable.PRODUCTID_FLD].ToString());
                    VOProductToControls();
                    // Load dstRouting
                    RoutingBO boRout = new RoutingBO();
                    dstRouting = boRout.ListRoutingByProduct(voProduct.ProductID);
                    if (dstRouting.Tables[0].Rows.Count > 0)
                    {

                    }
                    DataColumn[] objDataCols = new DataColumn[1];
                    objDataCols[0] = dstRouting.Tables[ITM_RoutingTable.TABLE_NAME].Columns[ITM_RoutingTable.ROUTINGID_FLD];
                    dstRouting.Tables[ITM_RoutingTable.TABLE_NAME].PrimaryKey = objDataCols;

                    InitRouting();
                    ResstoreGridButton();

                }
            }
            catch (PCSException ex)
            {
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }

            // Code Inserted Automatically

            #region Code Inserted Automatically

            this.Cursor = Cursors.Default;

            #endregion Code Inserted Automatically


        }

        //**************************************************************************              
        ///    <Description>
        ///       This method uses to update data when user change col row
        ///    </Description>
        ///    <Inputs>
        ///            
        ///    </Inputs>
        ///    <Outputs>
        ///       
        ///    </Outputs>
        ///    <Returns>
        ///       
        ///    </Returns>
        ///    <Authors>
        ///       Hoang Trung Son - iSphere software
        ///    </Authors>
        ///    <History>
        ///       Thursday, January 27, 2005
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************
        private void gridRouting_RowColChange(object sender, RowColChangeEventArgs e)
        {
            const string METHOD_NAME = THIS + ".gridRouting_RowColChange()";
            try
            {

            }
            catch (Exception ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        //**************************************************************************              
        ///    <Description>
        ///       This method uses to check before change
        ///    </Description>
        ///    <Inputs>
        ///            
        ///    </Inputs>
        ///    <Outputs>
        ///       
        ///    </Outputs>
        ///    <Returns>
        ///       
        ///    </Returns>
        ///    <Authors>
        ///       Hoang Trung Son - iSphere software
        ///    </Authors>
        ///    <History>
        ///       Thursday, January 27, 2005
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************
        private void gridRouting_BeforeRowColChange(object sender, C1.Win.C1TrueDBGrid.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".gridRouting_BeforeRowColChange()";
            try
            {

            }

            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        //**************************************************************************              
        ///    <Description>
        ///       This method uses to check mandatory
        ///    </Description>
        ///    <Inputs>
        ///            
        ///    </Inputs>
        ///    <Outputs>
        ///       
        ///    </Outputs>
        ///    <Returns>
        ///       
        ///    </Returns>
        ///    <Authors>
        ///       Hoang Trung Son - iSphere software
        ///    </Authors>
        ///    <History>
        ///       Thursday, January 27, 2005
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************
        private bool CheckMandatory(Control pobjControl)
        {
            if (pobjControl.Text.Trim() == string.Empty)
            {
                return true;
            }
            return false;
        }

        //**************************************************************************              
        ///    <Description>
        ///       This method uses to process when form close
        ///    </Description>
        ///    <Inputs>
        ///            
        ///    </Inputs>
        ///    <Outputs>
        ///       
        ///    </Outputs>
        ///    <Returns>
        ///       
        ///    </Returns>
        ///    <Authors>
        ///       Hoang Trung Son - iSphere software
        ///    </Authors>
        ///    <History>
        ///       Friday, January 28, 2005
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************
        private void Routing_Closing(object sender, CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnClose_Click()";
            try
            {
                if (gridRouting.EditActive) e.Cancel = true;
                // if the form has been change then ask to store database
                if (blnIsChanged)
                {
                    DialogResult enumDialog = PCSMessageBox.Show(ErrorCode.MESSAGE_QUESTION_STORE_INTO_DATABASE, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
                    if (enumDialog == DialogResult.Yes)
                    {
                        //Save before exit
                        btnSave_Click(btnSave, new EventArgs());
                        //e.Cancel = false;
                    }
                    else if (enumDialog == DialogResult.No) // click No button
                    {
                        //Close();
                        e.Cancel = false;
                    }
                    else if (enumDialog == DialogResult.Cancel) // click Cancel button
                    {
                        e.Cancel = true;
                    }
                }
                else // if has no change
                {
                    e.Cancel = false;
                }
            }
            catch (PCSException ex)
            {
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        #endregion Other events

        #region Other Functions
        //**************************************************************************              
        ///    <Description>
        ///       This method uses to init gird routing
        ///    </Description>
        ///    <Inputs>
        ///            
        ///    </Inputs>
        ///    <Outputs>
        ///       
        ///    </Outputs>
        ///    <Returns>
        ///       
        ///    </Returns>
        ///    <Authors>
        ///       Hoang Trung Son - iSphere software
        ///    </Authors>
        ///    <History>
        ///       Thursday, February 03, 2005
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************
        private void InitRouting()
        {
            RoutingBO boRouting = new RoutingBO();
            dstRouting = boRouting.ListRoutingByProduct(mProductID);
            gridRouting.DataSource = dstRouting.Tables[ITM_RoutingTable.TABLE_NAME];
            FormControlComponents.RestoreGridLayout(gridRouting, dtbGridLayout);
        }

        //**************************************************************************              
        ///    <Description>
        ///       Enable and Disable button according to each Form Status
        ///    </Description>
        ///    <Inputs>
        ///       
        ///    </Inputs>
        ///    <Outputs>
        ///       Button will be set enable = true|false
        ///    </Outputs>
        ///    <Returns>
        ///       
        ///    </Returns>
        ///    <Authors>
        ///       Hoang Trung Son - iSphere software
        ///    </Authors>
        ///    <History>
        ///       15-Dec-2004
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************
        private void SetEnableButtons()
        {
            switch (mFormAction)
            {
                case EnumAction.Default:
                    //Disable Buttons
                    btnSave.Enabled = false;
                    btnAdd.Enabled = true;
                    if (voProduct.ProductID > 0)
                    {
                        //Edit 
                        btnEdit.Enabled = true;
                        btnDelete.Enabled = true;
                    }
                    else
                    {
                        btnEdit.Enabled = false;
                        btnDelete.Enabled = false;
                    }
                    gridRouting.AllowAddNew = gridRouting.AllowUpdate = false;
                    break;

                default:
                    //Disable Buttons
                    btnAdd.Enabled = false;
                    btnEdit.Enabled = false;
                    btnDelete.Enabled = false;
                    //Enable Buttons
                    btnSave.Enabled = true;
                    break;
            }
        }


        #endregion Other Functions
        /// <summary>
        /// OnEnterControl
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <author>Trada</author>
        /// <date>Wednesday</date>
        private void OnEnterControl(object sender, EventArgs e)
        {
            const string METHOD_NAME = THIS + ".OnEnterControl()";
            try
            {
                FormControlComponents.OnEnterControl(sender, e);
            }
            catch (PCSException ex)
            {
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }
        /// <summary>
        /// OnLeaveControl
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <author>Trada</author>
        /// <date>Thursday, September 1 2005</date>
        private void OnLeaveControl(object sender, EventArgs e)
        {
            const string METHOD_NAME = THIS + ".OnLeaveControl()";
            try
            {
                FormControlComponents.OnLeaveControl(sender, e);
            }
            catch (PCSException ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        /// <summary>
        /// Routing_KeyDown
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <author>Trada</author>
        /// <date>Monday, October 10 2005</date>
        private void Routing_KeyDown(object sender, KeyEventArgs e)
        {
        }


        private void gridRouting_AfterDelete(object sender, EventArgs e)
        {
            const string METHOD_NAME = THIS + ".gridRouting_AfterDelete()";
            try
            {

            }
            catch (Exception ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        /// <summary>
        /// cboControl_Keydown
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <author>Trada</author>
        /// <date>Tuesday, October 11 2005</date>
        private void cboControl_Keydown(object sender, KeyEventArgs e)
        {
            const string METHOD_NAME = THIS + ".cboControl_Keydown()";
            try
            {
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }


        private void btnProductionLine_Click(object sender, EventArgs e)
        {
            // Code Inserted Automatically

            #region Code Inserted Automatically

            this.Cursor = Cursors.WaitCursor;

            #endregion Code Inserted Automatically


            const string METHOD_NAME = THIS + ".btnProductionLine_Click()";
            try
            {
                //Call OpenSearchForm for selecting Production Line
                DataRowView drwResult = FormControlComponents.OpenSearchForm(PRO_ProductionLineTable.TABLE_NAME, PRO_ProductionLineTable.CODE_FLD, txtProductionLine.Text.Trim(), null, true);

                //If has Production Line matched searching condition, fill values to form's controls
                if (drwResult != null)
                {
                    txtProductionLine.Text = drwResult[PRO_ProductionLineTable.CODE_FLD].ToString();
                    txtProductionLine.Tag = Convert.ToInt32(drwResult[PRO_ProductionLineTable.PRODUCTIONLINEID_FLD]);
                }
            }
            catch (PCSException ex)
            {
                dstRouting.RejectChanges();
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
            catch (Exception ex)
            {
                dstRouting.RejectChanges();
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }

            // Code Inserted Automatically

            #region Code Inserted Automatically

            this.Cursor = Cursors.Default;

            #endregion Code Inserted Automatically


        }
        /// <summary>
        /// txtProductionLine_Validating
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <author>Trada</author>
        /// <date>Thursday, January 12 2006</date>
        private void txtProductionLine_Validating(object sender, CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtProductionLine_Validating()";
            try
            {
                if (!txtProductionLine.Modified) return;
                //Call OpenSearchForm for selecting Production Line
                DataRowView drwResult = FormControlComponents.OpenSearchForm(PRO_ProductionLineTable.TABLE_NAME, PRO_ProductionLineTable.CODE_FLD, txtProductionLine.Text.Trim(), null, false);

                //If has Production Line matched searching condition, fill values to form's controls
                if (drwResult != null)
                {
                    txtProductionLine.Text = drwResult[PRO_ProductionLineTable.CODE_FLD].ToString();
                    txtProductionLine.Tag = Convert.ToInt32(drwResult[PRO_ProductionLineTable.PRODUCTIONLINEID_FLD]);
                }
                else
                    e.Cancel = true;
            }
            catch (PCSException ex)
            {
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtProductionLine_KeyDown(object sender, KeyEventArgs e)
        {
            // HACKED: dungla 15-02-2006
            if (e.KeyCode == Keys.F4)
            {
                if (sender.Equals(txtProductionLine) && btnProductionLine.Enabled)
                    btnProductionLine_Click(sender, new EventArgs());
            }
            // END: dungla 15-02-2006
        }

        private void gridRouting_ButtonClick(object sender, ColEventArgs e)
        {
            const string METHOD_NAME = THIS + ".gridRouting_ButtonClick()";
            string strColName = gridRouting.Splits[0].DisplayColumns[gridRouting.Col].DataColumn.DataField;
            //			Hashtable htbCondition = new Hashtable();
            if (!btnSave.Enabled) return;
            DataRowView drwResult = null;
            try
            {
                if ((strColName == "WorkCenterCode") && (!gridRouting.Splits[0].DisplayColumns[strColName].Locked))
                {
                    drwResult = FormControlComponents.OpenSearchForm("MST_WorkCenter", ITM_ProductTable.CODE_FLD, gridRouting[gridRouting.Row, strColName].ToString(), null, true);
                    if (drwResult != null)
                    {
                        //BindDataFromSearchFormToGrid(int.Parse(drwResult[ITM_ProductTable.PRODUCTID_FLD].ToString()));
                        gridRouting.Columns["WorkCenterCode"].Value = drwResult["Code"].ToString();
                        gridRouting.Columns["WorkCenterID"].Value = drwResult["WorkCenterID"];
                        gridRouting.Columns["WorkCenterName"].Value = drwResult["Name"].ToString();
                        gridRouting.Columns["CalculateTime"].Value = 1;
                        gridRouting.Columns["ProductID"].Value = mProductID;
                    }
                }
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void gridRouting_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
                case Keys.F4:
                    if (btnSave.Enabled)
                    {
                        gridRouting_ButtonClick(sender, null);
                    }
                    break;
                case Keys.Delete:
                    if (btnSave.Enabled)
                    {
                        FormControlComponents.DeleteMultiRowsOnTrueDBGrid(gridRouting);
                    }
                    break;
            }
        }

        private void gridRouting_OnAddNew(object sender, EventArgs e)
        {
            gridRouting.Columns["ProductID"].Value = mProductID;
        }

        private void gridRouting_BeforeColUpdate(object sender, BeforeColUpdateEventArgs e)
        {
            if (e.Column.DataColumn.DataField == "WorkCenterCode"
                && gridRouting.Columns[e.Column.DataColumn.DataField].Text != string.Empty)
            {
                DataRowView drwResult = FormControlComponents.OpenSearchForm("MST_WorkCenter", "Code", gridRouting.Columns[e.Column.DataColumn.DataField].Text.Trim(), null, false);
                if (drwResult != null)
                {
                    gridRouting.Columns["WorkCenterID"].Value = int.Parse(drwResult["WorkCenterID"].ToString());
                    gridRouting.Columns["WorkCenterCode"].Value = drwResult["Code"];
                    e.Column.DataColumn.Tag = drwResult.Row;
                }
                else
                {
                    e.Cancel = true;
                }
            }
        }

        private void gridRouting_AfterColUpdate(object sender, ColEventArgs e)
        {
            if (e.Column.DataColumn.DataField == "WorkCenterCode")
            {
                if (e.Column.DataColumn.Value.ToString() != string.Empty)
                {
                    gridRouting.Columns["WorkCenterID"].Value = ((DataRow)e.Column.DataColumn.Tag)["WorkCenterID"];
                    gridRouting.Columns["WorkCenterName"].Value = ((DataRow)e.Column.DataColumn.Tag)["Name"].ToString();
                    gridRouting.Columns["ProductID"].Value = mProductID;
                    gridRouting.Columns["CalculateTime"].Value = true;
                }
                else
                {
                    gridRouting.Columns["WorkCenterID"].Value = DBNull.Value;
                    gridRouting.Columns["WorkCenterName"].Value = DBNull.Value;
                }
            }
        }
    }
}
